﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Inmobiliaria.Presenters.ViewInterfaces;
using System.Collections.Specialized;
using Inmobiliaria.Services.Core.DTO;
using Inmobiliaria.UCControllers;

namespace Inmobiliaria.Presenters.WFPresenters
{
    public class ConsultarInmobiliariasPresenter : Presenter
    {
        ConsultarInmobiliariaUC _ConsultarInmobiliaria = new ConsultarInmobiliariaUC();
        private IViewConsultarInmobiliarias viewConsultarInmobiliarias;
        public ConsultarInmobiliariasPresenter(IViewConsultarInmobiliarias view)
            : base(view)
        {
            viewConsultarInmobiliarias = view;
        }
        public override void InitView(NameValueCollection queryString)
        { }
        public static List<DtoInmobiliaria> listaInmobiliaria = new List<DtoInmobiliaria>();
        public List<DtoInmobiliaria> ListaInmobiliaria
        {
            get { return listaInmobiliaria; }
            set { listaInmobiliaria = value; }
        }
        public void ConsultarInmobiliarias()
        {
            ListaInmobiliaria = _ConsultarInmobiliaria.ListarInmobiliarias();
            if (ListaInmobiliaria.Count > 0)
            {
                viewConsultarInmobiliarias.listarInmobiliaria = ListaInmobiliaria;
            }
        }
    }
}
